/**
*      author: Y_Yao
*      created: 2025-03-25 15:56:55
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 9e18;
const int INF = 0x3f3f3f3f;
const int N = 16 + 6;
int n;
int a[N][N];
bool vis[N];
int ans = 0;

void dfs(int cur,int sum)
{
    if(cur > n)
    {
        ans = max(ans,sum);
        return;
    }
    if(!vis[cur])//选cur
    {
        vis[cur] = true;

        for(int i = cur + 1;i <= n;i++)
        {
            if(vis[i]) continue;
            vis[i] = true;
            dfs(cur + 1,sum + a[i][cur]);
            vis[i] = false;
        }
        vis[cur] = false;
    }
    dfs(cur + 1,sum);//不选cur
}

void solve()
{
    cin >> n;
    int idex = 1;
    for(int i = 1;i < n;i++)
    {
        for(int j = i + 1;j <= n;j++)
        {
            int tmp = 0;
            cin >> tmp;
            a[i][j] = a[j][i] = tmp;
        }
    }

    dfs(1,0);
    cout << ans << endl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    // cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}